package operation.impl;

import book.BookList;
import operation.IOperation;

public class BorrowOperation implements IOperation{
    public void work(BookList bookList){
        System.out.println("您现在进行的是借书操作~");
        System.out.println("请输入您要借阅的书名->");
        String booksName = scanner.next();
        if (bookList.isContains(booksName)){
            bookList.borrowBook(booksName);
            System.out.println("借书成功！");
        }else {
            System.err.println("书架暂时还没有该书目~~");
        }
    }
}
